package com.aliyun.messagemgt.dto.base;

import com.aliyun.messagemgt.common.enums.IsEnabledEnum;
import com.aliyun.messagemgt.common.validation.EnumValid;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 基础表-接收组表
 * </p>
 *
 * @author wugongzi
 * @since 2021-09-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel("接收组新增cmd")
public class BaseReceiveGroupAddCmd implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(hidden = true)
    private Long id;

    @ApiModelProperty("租户编码")
    @NotBlank(message = "租户编码为空")
    private String tenantCode;

    @ApiModelProperty("接收组编码")
    @NotBlank(message = "接收组编码为空")
    private String receiveGroupCode;

    @ApiModelProperty("接收组名称")
    @NotBlank(message = "接收组名称为空")
    private String receiveGroupName;

    @ApiModelProperty("描述")
    private String description;

    @ApiModelProperty(value = "是否启用 Y-启用 N-停用",allowableValues = "Y,N",example = "Y")
    @EnumValid(message = "isEnabled值无效",target = IsEnabledEnum.class)
    private String isEnabled;

    @ApiModelProperty("创建人")
    private String creator;

    @ApiModelProperty("接收组范围")
    @Valid
    private List<BaseReceiveGroupRangeAddCmd> baseReceiveGroupRangeAddCmdList;
}
